//
//  TopMenuMainViewController.m
//  WisdomZhuHai
//
//  Created by JasonLee on 15/1/29.
//  Copyright (c) 2015年 wyd. All rights reserved.
//

#import "CollectionMenuMainViewController.h"
#import "CollectionMenuTitleViewController.h"
#import "CollectionMenuPageViewController.h"
#import "TransforController.h"

@interface CollectionMenuMainViewController ()

@end

@implementation CollectionMenuMainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    UIView *topShadowImageView = [TransforController shardeInstanceOfNavigationBarAndStatusBarCoverViewWithY:0 andTitle:self.string_title];
//    [topShadowImageView setImage:[UIImage imageNamed:@"top_background_shadow.png"]];
    [self.view addSubview:topShadowImageView];
    
    CollectionMenuTitleViewController *topMenuTitleViewController = [CollectionMenuTitleViewController getInstance];
    CollectionMenuPageViewController *topMenuPageViewController = [CollectionMenuPageViewController getInstance];
    [topMenuPageViewController setTitleView:topMenuTitleViewController];
    [topMenuTitleViewController setPageView:topMenuPageViewController];
//    topMenuTitleViewController.titleArray = @[@"测试1", @"测试2", @"测试3", @"测试4", @"百度", @"中国雅虎", @"新闻", @"流行"];
//    topMenuPageViewController.viewNameArray = @[@"苹果中国", @"iCloud", @"新浪微薄", @"维基百科", @"百度", @"中国雅虎", @"新闻", @"流行"];
    topMenuTitleViewController.titleArray = self.array_title;
    topMenuPageViewController.viewPageArray = self.array_page;
    topMenuPageViewController.isInstanceOfTableView = self.isInstanceOfTableView;
    
    [self.view addSubview:topMenuTitleViewController];
    [self.view addSubview:topMenuPageViewController];
    
    [topMenuTitleViewController initWithTitleButtons];
    [topMenuPageViewController initWithViews];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)dealloc{
    [super dealloc];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
